package com.bltec.emergency.service.resService.impl;

import com.bltec.emergency.mapper.ResExternalMapper;
import com.bltec.emergency.model.ResExternal;
import com.bltec.emergency.service.resService.ResExternalService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ResExternalServiceImpl implements ResExternalService {
    @Resource
    private ResExternalMapper resExternalMapper;
    @Override
    public boolean add(ResExternal resExternal) {
        return resExternalMapper.insert(resExternal);
    }

    @Override
    public boolean deleteResExternalById(Long id) {
        return resExternalMapper.setDisableById(id);
    }

    @Override
    public boolean updateResExternalById(ResExternal resExternal) {
        return resExternalMapper.updateResExternalById(resExternal);
    }

    @Override
    public ResExternal getResExternalById(Long id) {
        return resExternalMapper.getResExternalById(id);
    }

    @Override
    public List<ResExternal> getAll() {
        return resExternalMapper.selectAll();
    }
}
